package com.customer;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.SpringCloudApplication;
import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.openfeign.EnableFeignClients;

@SpringBootApplication
//@EnableEurekaClient
@EnableDiscoveryClient  // 开启eureka客户端
@EnableCircuitBreaker  // 开启熔断处理

// @SpringCloudApplication 可以使用SpringCloudApplication注解代替上面三个注解，该注解包含上面三个注解
@EnableFeignClients // 开启feign客户端
// feign已经集成了Ribbon负载均衡的RestTemplate，所以，不用再注册RestTemplate
public class ServiceCustomerApplication {
    public static void main(String[] args) {
        SpringApplication.run(ServiceCustomerApplication.class);
    }
}
